<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        let map = new Map(
            [
            ["name","张三"],
            ["age",18],
            [[1,2],"这是一个键名为数组的键值对"]
        ]
        );
        // let map = new Map(
        //     [
        //         ["name","张三"],//键值对1
        //         ["age","18"],//键值对2
        //         [[1,2],"这是一个键名为数组的键值对"]//键值对3
        //     ]
        // );
        // console.log(map);
        // console.log(map.size)
        map.set("name","李四");
        console.log(map);
        console.log(map.get("gender"));
        console.log(map.has("gender"))
        map.set("gender","男");
        console.log(map);

        console.log(map.get("name"));

        console.log(map.has("name"));
        console.log(map.has("skill"));

        map.delete("name");
        console.log(map);

        map.clear();
        console.log(map)
    </script>
</body>
</html>